{layout name="public/layout"}
{include file="public/fenlei" /}
<link rel="stylesheet" href="__INDEX__/css/play.css">
<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class=" content detail">
            <div class="am-panel am-panel-default layui-col-md9">
                <div class="am-panel-bd">
                    <div class="bofangdiv">
                        <img id="addids" src="__INDEX__/images/pay1.jpg" style="display: block;width:100%;">
                        <img id="addid" src="__INDEX__/images/pay1.jpg" style="display: none;width:100%;">

                        <iframe id="video" src="{:url('Pay/pay')}" style="width:100%;border:0px #d8d8d8 solid;display: none"></iframe>
                        <a style="display:none" id="videourlgo" href=""></a>
                    </div>
                    <div id="xuji" class="layui-bg-cyan" style="">
                        <div class="layui-btn-group" id="xlu" style="display: none;!important;">
                            <?php foreach(config("ApiUrl") as $k=>$y){?>
                            <button class="layui-btn" onclick="xldata('{$y}')">线路{$k}</button>
                            <?php }?>
                        </div>
                        <script type="text/javascript">
                            function xldata(urls){
                                var videourls = document.getElementById('video');
                                var xlqieh = document.getElementById('videourlgo');
                                videourls.src = urls+xlqieh.href;
                            }
                        </script>
                    </div>
                    <div class="dianshijua" id="dianshijuid">
                        <script type="text/javascript">
                            var al = $('.num-tab-main a');
                            al.attr('class','am-btn am-btn-default lipbtn');
                            var ji= new Array();
                            var btnji= new Array();
                            for(var g=0;g<al.length;g++){
                                ji.push(al[g].href);
                                btnji.push(al[g].id);
                                al[g].href = 'javascript:void(0)';
                                al[g].target = '_self';
                                al.eq(g).attr('onclick','bofang(\''+ji[g]+'\',\''+btnji[g]+'\')');
                            };
                            if($("div").hasClass("js-tab-main")){
                                var taba = $('.js-tab-main a');
                                for(var g=0;g<taba.length;g++){
                                    taba.eq(g).attr('onclick','tabqh(\''+[g]+'\')');
                                };
                                var numtba = $('.num-tab .num-tab-main');
                                for(var g=0;g<numtba.length;g++){
                                    numtba.eq(g).attr('id','num'+[g]);
                                };
                                document.getElementById('num1').style.display = 'block';
                                function tabqh(ylen){
                                    var idylen = parseInt(ylen);
                                    var tabalen = $('.js-tab-main a').length;
                                    for (var xcyh=0;xcyh<tabalen;xcyh++) {
                                        document.getElementById('num'+xcyh).style.display = 'none';
                                    }
                                    document.getElementById('num'+idylen).style.display = 'block';
                                }
                            }
                        </script>
                        <script type="text/javascript">
                            function bofang(mp4url,jiid){
                                document.getElementById('videourlgo').href=mp4url;
                                if(mp4url.indexOf('iqiyi')>=0){
                                    document.getElementById('video').src='{:config("ApiUrl.1")}'+mp4url;
                                }else if(mp4url.indexOf('qq')>=0){
                                    document.getElementById('video').src='{:config("ApiUrl.1")}'+mp4url;
                                }else if(mp4url.indexOf('sohu')>=0){
                                    document.getElementById('video').src='{:config("ApiUrl.1")}'+mp4url;
                                }else if(mp4url.indexOf('youku')>=0){
                                    document.getElementById('video').src='{:config("ApiUrl.1")}'+mp4url;
                                }else if(mp4url.indexOf('tudou')>=0){
                                    document.getElementById('video').src='{:config("ApiUrl.1")}'+mp4url;
                                }else if(mp4url.indexOf('le')>=0){
                                    document.getElementById('video').src='{:config("ApiUrl.1")}'+mp4url;
                                }else if(mp4url.indexOf('58')>=0 && mp4url.indexOf('58')<5 ){
                                    document.getElementById('video').src='{:config("ApiUrl.1")}'+mp4url;
                                }else{
                                    document.getElementById('video').src='{:config("ApiUrl.1")}'+mp4url;
                                };
                                //点击之后
                                document.getElementById('xuji').style.display='block';
                                document.getElementById('video').style.display='none';
                                document.getElementById('addid').style.display = 'block';
                                document.getElementById('xlu').style.display = 'block';
                                document.getElementById('addids').style.display = 'none';
                                function test() {
                                    document.getElementById('video').style.display='block';
                                    document.getElementById('addid').style.display = 'none';
                                    document.getElementById('addids').style.display = 'none';


                                }
                                setTimeout(test, 3000);
                            };
                        </script>
                    </div>
                </div>
            </div>
            <div class="layui-col-md3">
                <div class="sidebar">
                    <div class="hy-play-list play">
                        <div class="item tyui" id="playlist">
                            <div class="panel clearfix" id="play_playdata">
                                <div class="option layui-bg-black" data-toggle="collapse" data-parent="#playlist" href="#playlist1" aria-expanded="true">
                                    <span class="text-muted pull-right">播放列表</span>

                                </div>
                                <div id="playlist1" class="playlist collapse in">
                                    <ul class="playlistlink-1 list-15256 clearfix">
                                        <div class="s-top-list-ji">

                                            <div class="ji-tab-content js-tab-content" style="opacity:1;">
                                                <div class="num-tab js-tabs">
                                                    <div class="num-tab-main g-clear js-tab">

                                                            <?php if(is_array($data['pay_url'])){?>
                                                            <?php foreach($data['pay_url'] as $k=>$y){?>
                                                            <li class="layui-col-md4">
                                                                <a href='{$y}'>{$k+1}</a>
                                                            </li>

                                                            <?php }?>
                                                            <?php }else{ ?>
                                                            <li class="">
                                                                <a href='{$data.pay_url}'>{$data.pay_title}</a>
                                                            </li>
                                                            <?php }?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </ul>
                                </div>
                                <script type="text/javascript">
                                    var al = $('.playlist a');
                                    al.attr('class','am-btn am-btn-default lipbtn ');
                                    var ji= new Array();
                                    var btnji= new Array();
                                    for(var g=0;g<al.length;g++){
                                        ji.push(al[g].href);
                                        btnji.push(al[g].id);
                                        al[g].href = 'javascript:void(0)';
                                        al[g].target = '_self';
                                        al.eq(g).attr('onclick','bofang(\''+ji[g]+'\',\''+btnji[g]+'\')');

                                    };

                                </script>


                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md9 layui-col-sm12">
                <fieldset class="layui-elem-field hy-layout">
                    <legend>剧情简介</legend>
                    <div class="layui-field-box">
                        {$data.pay_briefing}
                    </div>
                </fieldset>
        </div>

            <div class="layui-col-md3">
                <dl class="fly-panel fly-list-one">
                    <dt class="fly-panel-title">本周热议</dt>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>
                    <dd>
                        <a href="">基于 layui 的极简社区页面模版</a>
                        <span><i class="iconfont icon-pinglun1"></i> 16</span>
                    </dd>

                    <!-- 无数据时 -->
                    <!--
                    <div class="fly-none">没有相关数据</div>
                    -->
                </dl>

                <div class="fly-panel">
                    <div class="fly-panel-title">
                        这里可作为广告区域
                    </div>
                    <div class="fly-panel-main">
                        <a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #5FB878;">LayIM 3.0 - layui 旗舰之作</a>
                    </div>
                </div>

                <div class="fly-panel" style="padding: 20px 0; text-align: center;">
                    <img src="../../res/images/weixin.jpg" style="max-width: 100%;" alt="layui">
                    <p style="position: relative; color: #666;">微信扫码关注 layui 公众号</p>
                </div>

            </div>
    </div>
</div>
<script type='text/javascript' src='__INDEX__/js/main.js'></script>



